﻿using System;
using System.IO;

namespace OpenLS.Spreadsheet.Formats.Biff.OfficeArt
{
    abstract class OfficeArtHeaderedBlip: OfficeArtBlip
    {
        private OfficeArtMetafileHeader metafileHeader;

        protected OfficeArtHeaderedBlip(byte[] data): base (data)
        {
        }

        protected OfficeArtHeaderedBlip() : base()
        {
        }

        protected override sealed int ReadRest(BinaryReader reader)
        {
            metafileHeader = new OfficeArtMetafileHeader();
            metafileHeader.Read(reader);
            return OfficeArtMetafileHeader.Size;
        }
        protected override void WriteRest(BinaryWriter writer)
        {
            metafileHeader.Write(writer);
        }
        protected override sealed int RestByteLength
        {
            get { return metafileHeader.ByteLength; }
        }
        
    }
}